<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<jsp:include page="/common/jsp/commonres.jsp" />
<link rel="stylesheet"
	href="${basePath}/jslib/easyui/themes/opmex/common.css" type="text/css"/>
<style>
    #menu_form_div_sp>div{cursor: pointer;}
</style>
</head>
<body>

	<!-- 菜单表格 -->
	<table id="menu_table_grid" class="easyui-treegrid" title=""></table>
	<!-- 工具栏 -->
	<div id="menu_div_toolbar">
		<om:a authKey="" cssClass="jsAdd easyui-linkbutton"
			href="javascript:config.events.toolbar.add()"
			data-options="iconCls:'icon-add'" plain="true">新增</om:a>

		<om:a authKey="" cssClass="jsRemove easyui-linkbutton"
			href="javascript:config.events.toolbar.remove()"
			data-options="iconCls:'icon-remove'" plain="true">删除</om:a>
		<om:a authKey="" cssClass="jsEdit easyui-linkbutton"
			href="javascript:config.events.toolbar.edit()"
			data-options="iconCls:'icon-edit'" plain="true">修改</om:a>
		<om:a authKey="" cssClass="jsEdit easyui-linkbutton"
			href="javascript:config.events.toolbar.viewMenu()"
			data-options="iconCls:'icon-edit'" plain="true">查看</om:a>
		<om:a authKey="" cssClass="easyui-linkbutton"
			href="javascript:location.reload()"
			data-options="iconCls:'icon-reload'" plain="true">刷新</om:a>
		<om:a authKey="" cssClass="easyui-linkbutton"
			href="javascript:config.events.toolbar.enable()"
			data-options="iconCls:'icon-edit'" plain="true">启用</om:a>
		<om:a authKey="" cssClass="easyui-linkbutton"
			href="javascript:config.events.toolbar.disable()"
			data-options="iconCls:'icon-edit'" plain="true">禁用</om:a>

	</div>


	<!-- 弹出新增/修改对话框 -->
	<div id="menu_window" class="easyui-dialog" title="菜单管理(带星号(*)的为必填项)"
		style="width:580px;height:400px; padding:10px"
		data-options="modal:true,minimizable:false,maximizable:false,collapsible:false,closed:true,buttons:menu_div_buttons">
		<form id="menu_form">
			<table class="dialog_table">
				<tr>
					<td>名称:</td>
					<td><input type="text" name="menu.name" data-key="name"
						class="easyui-validatebox dialog_text" data-options="required:true"
						data-clear="true"></td>
						<td style="width: 30px"></td>
					<td>父节点:</td>
					<td><input id="menu_form_parentNodes" name="menu.pid"
						data-clear="true"> <input type="hidden" data-clear="true"
						name="menu.id" data-key="id"></td>
				</tr>
				<tr>
					<td>顺序:</td>
					<td><input type="text" id="menu_form_input_seq" data-key="seq"
						class="easyui-numberspinner"
						data-options="increment:1,editable:false,min:1,width:200"
						data-clear="true" name="menu.seq"></td>
						<td style="width: 30px"></td>
					<td>是否启用:</td>
					<td id="menu_form_td_checkbox"><input type="checkbox"
						data-key='checkbox' name="menu.isEnable" checked value="true">
					</td>
				</tr>
				<tr id="menu_form_tr_authKey">
					<td>权限值:</td>
					<td><input type="text" id="menu_form_input_AuthKey"
						name="menu.authKey" data-key="authKey" data-clear="true">
					</td>
					<td style="width: 30px"></td>
					<td>图标:</td>
					<td class="jsTdIcons"><select id="menu_form_select_icons"
						name="menu.icon" style="width:200px"></select>

						<div id="menu_form_div_sp"></div></td>
				</tr>
				<tr>
					<td>URL:</td>
					<td colspan="4"><input type="text" data-key="url"
						class="easyui-validatebox dialog_text" name="menu.url" data-clear="true"
						data-options="required:true"></td>
				</tr>
				<tr>
					<td>描述:</td>
					<td colspan="4"><textarea data-key="remark" name="menu.remark"
							data-clear="true"></textarea>
					</td>
				</tr>
			</table>
		</form>
		<div id="menu_div_buttons">
			<a id="menu_div_buttons_btn_ok"
				href="javascript:config.events.save();" class="easyui-linkbutton"
				data-options="iconCls:'icon-ok'">确认</a> <a
				id="menu_div_buttons_btn_reset"
				href="javascript:config.events.clearWinValue();"
				class="easyui-linkbutton" data-options="iconCls:'icon-reload'">重置</a>
			<a id="menu_div_buttons_btn_close"
				href="javascript:config.events.hideWin();" class="easyui-linkbutton"
				data-options="iconCls:'icon-no'">关闭</a>
		</div>

	</div>

	<div id="menu_js_contextMenu" class="easyui-menu" style="width:120px;">
		<div onclick="config.events.toolbar.add()"
			data-options="iconCls:'icon-add'">新增</div>
		<div onclick="config.events.toolbar.edit()"
			data-options="iconCls:'icon-edit'">修改</div>
		<div onclick="config.events.toolbar.remove()"
			data-options="iconCls:'icon-remove'">删除</div>
		<div onclick="location.reload()" data-options="iconCls:'icon-reload'">刷新
		</div>
	</div>
	<script src="${basePath}/page/menu/menu.js"></script>
</body>
</html>